package solution;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;

/**
 * @author : wenchao.long
 * @date : Created in 2024-04-28 下午 6:14 周日
 * @description :
 */
public class No5 {

	public static void main(String[] args) {
		List<List<Integer>> result = new ArrayList<>();
		long sum = 1;
		for (int i = 1; i <= 20; ++i) {
			sum *= i;
		}
		System.out.println(sum);
//		long startTime = System.nanoTime();
//		int i = new Random().nextInt(100);
//		System.out.println(i);
//		DFS(i, ints, 0, new ArrayList<>(), result);
//		long endTime = System.nanoTime();
//		System.out.println(((endTime - startTime) * 1.0 / 1000000) / (1000 * 1.0));
//		System.out.println(result.size());
	}


	private static void DFS(int sums, int[] array, int index, List<Integer> current, List<List<Integer>> allCombinations) {
		int sum = current.stream().mapToInt(x -> x).sum();
		if (sums == sum) {
			allCombinations.add(new ArrayList<>(current));
			return;
		}
		if (index == array.length) {
			allCombinations.add(new ArrayList<>(current));
			return;
		}
		for (int i = index; i < array.length; ++i) {
			current.add(array[i]);
			DFS(sums, array, i + 1, current, allCombinations);
			current.remove(current.size() - 1);
		}
	}
}
